From: Jason Rumney Date: Tue, 24 Jul 2007 23:56:27 +0000 (+0000) Subject: (x_real_positions): Get real position from OS instead of calculating it. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~534^2~3^2~2162 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6b914485c5eb185fc8543f34029fcee2f09ee89d;p=emacs.git (x_real_positions): Get real position from OS instead of calculating it. --- diff --git a/src/w32fns.c b/src/w32fns.c index 47ca9157623..fcf2761ce98 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -436,20 +436,21 @@ x_real_positions (f, xptr, yptr) POINT pt; RECT rect; - GetClientRect(FRAME_W32_WINDOW(f), &rect); - AdjustWindowRect(&rect, f->output_data.w32->dwStyle, FRAME_EXTERNAL_MENU_BAR(f)); + /* Get the bounds of the WM window. */ + GetWindowRect (FRAME_W32_WINDOW (f), &rect); - pt.x = rect.left; - pt.y = rect.top; + pt.x = 0; + pt.y = 0; - ClientToScreen (FRAME_W32_WINDOW(f), &pt); + /* Convert (0, 0) in the client area to screen co-ordinates. */ + ClientToScreen (FRAME_W32_WINDOW (f), &pt); /* Remember x_pixels_diff and y_pixels_diff. */ f->x_pixels_diff = pt.x - rect.left; f->y_pixels_diff = pt.y - rect.top; - *xptr = pt.x; - *yptr = pt.y; + *xptr = rect.left; + *yptr = rect.top; }